package service.admin.impl;

import com.alibaba.fastjson.JSONArray;
import dao.admin.BorrowListDao;
import dao.admin.impl.BorrowListDaoImpl;
import entity.Pages;
import service.admin.BorrowListService;

/**
 * BorrowListServiceImpl
 *
 * @author lenovo
 * @since 2023/9/5
 */
public class BorrowListServiceImpl implements BorrowListService {
    //引入数据访问层
    BorrowListDao dao = new BorrowListDaoImpl();

    @Override
    public JSONArray getList(String condition, String conditionValue, Pages pages) {
        int pageSize = pages.getPageSize();
        int pageIndex = (pages.getPageCountNo() - 1) * pageSize;
        return dao.getList(condition,conditionValue,pageIndex,pageSize);
    }

    @Override
    public int total(String condition, String conditionValue) {
        return dao.total(condition,conditionValue);
    }
}
